#define _CRT_SECURE_NO_WARNINGS 1
#include"Seqlist.h"


void test_01()
{
	SL* ps = (SL*)malloc(sizeof(SL));
	SqInit(ps);
	Sqpush_back(ps, 1);
	Sqpush_back(ps, 2);
	Sqpush_back(ps, 3);
	Sqpush_back(ps, 4);
	Sqpush_back(ps, 5);
	Sqpush_back(ps, 6);
	SqPrint(ps);
}

void test_02()
{
	SL* ps = (SL*)malloc(sizeof(SL));
	SqInit(ps);
	Sqpush_back(ps, 1);
	Sqpush_back(ps, 2);
	Sqpush_back(ps, 3);
	Sqpush_back(ps, 4);
	Sqpush_back(ps, 5);
	Sqpush_back(ps, 6);
	SqPrint(ps);

	Sqpop_back(ps);
	Sqpop_back(ps);
	SqPrint(ps);

	Sqpop_front(ps);
	Sqpop_front(ps);
	Sqpop_front(ps);

	SqPrint(ps);
}

void test_03()
{
	SL* ps = (SL*)malloc(sizeof(SL));
	SqInit(ps);
	Sqpush_back(ps, 1);
	Sqpush_back(ps, 2);
	Sqpush_back(ps, 3);
	Sqpush_back(ps, 4);
	Insert(ps, 2, 666);
	SqPrint(ps);

	Erase(ps, 4);
	Erase(ps, 0);
	SqPrint(ps);
}

int main()
{
	//test_01();
	//test_02();
	test_03();
	return 0;
}